package com.happycat.controller;


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.happycat.Pagination;
import com.happycat.ResponseHeaderModel;
import com.happycat.ResponseModel;
import com.happycat.mobile.model.UserSetting;
import com.happycat.mobile.service.UserSettingService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author liaoyong
 * @since 2020-08-09
 */
@RestController
@RequestMapping("/userSetting")
@Api(value = "用户设置", description = "用户设置接口")
public class UserSettingController {
    @Autowired
	private UserSettingService userSettingService;
	
	@ApiOperation(value = "用户设置详情")
    @RequestMapping(method = RequestMethod.POST, value = "/detail")
	public ResponseModel<UserSetting> detail(@RequestBody UserSetting userSetting){
		return userSettingService.selectOne(userSetting);
	}
	
	@RequestMapping(method = RequestMethod.POST, value = "/queryUserSettingList")
	@ApiOperation(value = "用户设置分类查询")
	public ResponseModel<List<UserSetting>> queryUserSettingList(@RequestBody UserSetting userSetting){
		
		return userSettingService.queryUserSettingList(userSetting);
	}
	
	@ApiOperation(value = "用户设置编辑")
	@RequestMapping(method = RequestMethod.POST, value = "/modify")
	public ResponseHeaderModel modify(@RequestBody UserSetting userSetting){
	
	   return userSettingService.modify(userSetting);
	}
	
}

